<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('财政审核列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>审核单号：</label>
                                <input type="text" name="auditUuid"/>
                            </li>
                            <li>
                                <label>客户名称：</label>
                                <input type="text" name="auditCustomerName"/>
                            </li>
                            <li>
                                <label>订单状态：</label>
                                <select name="auditOrderStatus">
                                    <option value="">所有</option>
                                    <option value="-1">代码生成请选择字典属性</option>
                                </select>
                            </li>
                            <!--<li>-->
                                <!--<label>付款方式：</label>-->
                                <!--<input type="text" name="auditPaymentMethod"/>-->
                            <!--</li>-->
                            <!--<li>-->
                                <!--<label>业务员：</label>-->
                                <!--<input type="text" name="auditSalesman"/>-->
                            <!--</li>-->
                            <!--<li>-->
                                <!--<label>审核原因：</label>-->
                                <!--<input type="text" name="auditReason"/>-->
                            <!--</li>-->
                            <!--<li>-->
                                <!--<label>下单金额：</label>-->
                                <!--<input type="text" name="auditOrderAmount"/>-->
                            <!--</li>-->
                            <!--<li>-->
                                <!--<label>授信额度：</label>-->
                                <!--<input type="text" name="auditCreditLine"/>-->
                            <!--</li>-->
                            <!--<li>-->
                                <!--<label>最大授信额度：</label>-->
                                <!--<input type="text" name="auditMaximumCreditLine"/>-->
                            <!--</li>-->
                            <li>
                                <label>下单时间：</label>
                                <input type="text" class="time-input" placeholder="请选择下单时间" name="auditOrderTime"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <!--<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>-->
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:audit:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:audit:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:audit:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:audit:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('system:audit:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:audit:remove')}]];
        var prefix = ctx + "system/audit";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "财政审核",
                columns: [{
                    checkbox: true
                },
                // {
                //     field: 'auditId',
                //     title: '主键id',
                //     visible: false
                // },
                {
                    field: 'auditUuid',
                    title: '审核单号'
                },
                {
                    field: 'auditCustomerName',
                    title: '客户名称'
                },
                {
                    field: 'auditOrderStatus',
                    title: '订单状态'
                },
                {
                    field: 'auditPaymentMethod',
                    title: '付款方式'
                },
                {
                    field: 'auditSalesman',
                    title: '业务员'
                },
                {
                    field: 'auditReason',
                    title: '审核原因'
                },
                {
                    field: 'auditOrderAmount',
                    title: '下单金额'
                },
                {
                    field: 'auditCreditLine',
                    title: '授信额度'
                },
                // {
                //     field: 'auditMaximumCreditLine',
                //     title: '最大授信额度'
                // },
                {
                    field: 'auditOrderTime',
                    title: '下单时间'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.auditId + '\')"><i class="fa fa-edit"></i>通过</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.auditId + '\')"><i class="fa fa-remove"></i>审核不通过</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>